﻿//  Copyright (c) 2009 Ray Liang (http://www.dotnetage.com)
//  Dual licensed under the MIT and GPL licenses:
//  http://www.opensource.org/licenses/mit-license.php
//  http://www.gnu.org/licenses/gpl.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DNA.Mvc.jQuery
{
    /// <summary>
    /// Defines a strongly type class of the DJP editable plugin options.
    /// </summary>
    public class EditableOptions
    {
        /// <summary>
        /// Gets/Sets the css class name when the editable is active
        /// </summary>
        [jQueryOption("activeClass")]
        public string ActiveCssClass { get; set; }

        /// <summary>
        /// Gets/Sets the client event handler scripts when the editable is completed this event will be trigger. 
        /// </summary>
        [jQueryOption("submit",ValueType=JavaScriptTypes.Function,FunctionParams=new string[]{"event","text"})]
        public string OnSubmit { get; set; }

        /// <summary>
        /// Gets/Sets the client event handler scripts when the editable has been cancel by user this event will be trigger. 
        /// </summary>
        [jQueryOption("submit", ValueType = JavaScriptTypes.Function)]
        public string OnCancel { get; set; }
    }
}
